package org.adultedu.service.serviceimpl;

import org.adultedu.dao.CtypeMapper;
import org.adultedu.pojo.Ctype;
import org.adultedu.service.CtypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Transactional
@Service("CtypeServiceImpl")
public class CtypeServiceImpl implements CtypeService {
    @Autowired
    private CtypeMapper ctypeMapper;

    public List<Ctype> queryCtype(Ctype ctype) {
        return ctypeMapper.queryCtype(ctype);
    }

    public int updateCtype(Ctype ctype) {
        return ctypeMapper.updateCtype(ctype);
    }

    public int insertCtype(Ctype ctype) {
        return ctypeMapper.insertCtype(ctype);
    }

    @Override
    public int insertCtypeByMap(Map map) {
        return ctypeMapper.insertCtypeByMap(map);
    }

    public int deleteCtype(Ctype ctype) {
        return ctypeMapper.deleteCtype(ctype);
    }
}
